package com.yxy.chatserver.mapper;

import com.yxy.chatserver.domain.po.BaseMessage;
import com.yxy.chatserver.domain.po.MessageContents;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageContentsMapper {
    /**
     * 批量保存消息
     * @param list
     */
    void saveFieldBatch(List<MessageContents> list);

    /**
     * 根据消息id获取消息内容
     * @param id
     * @return
     */
    @Select("select * from message_contents where message_id = #{id}")
    List<MessageContents> getMessageContentsByMessageId(String id);
}
